<script setup lang="ts">
import ConsultList from "@/views/user/views/consultPage/components/consultList.vue";
import { Ref, ref } from "vue";
import { ConsultType } from "@/enums";

const active: Ref<number> = ref<number>(2);

</script>

<template>
   <div class="consult-page">
      <nav-bar title="问诊记录" left-text="返回" @click-left="$router.replace('/')"></nav-bar>
      <van-tabs sticky v-model:active="active">
         <van-tab title="极速问诊" :name="ConsultType.Fast">
            <consult-list :type="active" />
         </van-tab>
         <van-tab title="找医生" :name="ConsultType.Doctor">
            <consult-list :type="active" />
         </van-tab>
         <van-tab title="开药问诊" :name="ConsultType.Medication">
            <consult-list :type="active" />
         </van-tab>
      </van-tabs>
   </div>
</template>

<style scoped lang="scss">
.consult-page {
   background-color: var(--cp-bg);
   min-height: calc(100vh - 46px);

   :deep(.van-tabs) {
      .van-tabs__nav {
         padding: 0 0 15px 0;
      }

      .van-tabs__line {
         width: 20px;
         background-color: var(--cp-primary);
      }

      .van-tab {
         padding: 0 15px;
      }
   }
}
</style>
